import myaxios from "./myaxios";

/* 某天用户注册量 */
const getUsercount = (date) => myaxios.get('/statis/user/'+date+'/count')
/* 所有用户注册量 */
const getAllusercount = () => myaxios.get('/v1/users/count')
/* 新增订单 */
const getOrdercount = (date) => myaxios.get('/statis/order/'+date+'/count')
/* 总订单量 */
const getAllordercount = () => myaxios.get('/bos/orders/count')
/* 新增管理员 */
const getAdmincount = (date) => myaxios.get('/statis/admin/'+date+'/count')
/* 管理员 */
const getAlladmincount = () => myaxios.get('/admin/count');
/* 食品数量 */
const getAllfoodcount = () => myaxios.get('/shopping/v2/foods/count');
/* 获取用户列表 */
const getUserslist = (data) => myaxios.get('/v1/users/list', {
    params: {
        ...data,
    }
});
/* 获取管理员列表 */
const getAdminslist=(data) => myaxios.get('/admin/all', {
    params: {
        ...data,
    }
});
/* 获取订单列表 */
const getOrderslist=(data) => myaxios.get('/bos/orders', {
    params: {
        ...data,
    }
});
/* 获取食品列表 */
const getFoodslist=(data) => myaxios.get('/shopping/v2/foods', {
    params: {
        ...data,
    }
});
/* 更新食品详情 */
const updatafood=(data) => myaxios.post('/shopping/v2/updatefood', {
        ...data,
});
/* 导出 */
export{
    getUsercount,
    getAllusercount,
    getOrdercount,
    getAllordercount,
    getAdmincount,
    getAlladmincount,
    getUserslist,
    getAdminslist,
    getOrderslist,
    getAllfoodcount,
    getFoodslist,
    updatafood
}

